package com.guaika.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.guaika.reggie.common.ResultMessage;
import com.guaika.reggie.entity.Employee;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @author GuaiKa
 */
public interface EmployeeService extends IService<Employee> {
    /***
     * 登录校验
     * @param request
     * @param employee
     * @return
     */
    ResultMessage login(HttpServletRequest request,Employee employee);

    /***
     * 新增员工
     * @param request
     * @param employee
     * @return
     */
    ResultMessage<String> employeeSave(HttpServletRequest request, Employee employee);

    /***
     * 分页查询
     * @param page
     * @param pageSize
     * @param name
     * @return
     */
    ResultMessage<Page> employeePage(int page, int pageSize, String name);

    /***
     * 更新员工信息
     * @param employee
     * @param request
     * @return
     */
    ResultMessage<String> employeeUpdate(Employee employee, HttpServletRequest request);

    /***
     * 根据Id查询数据
     * @param id
     * @return
     */
    ResultMessage<Employee> employeeQueryById(Long id);
}
